home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / gtlayout / source / ltp_addgadgets.c < prev    next >
C/C++ Source or Header  |  1999-04-19  |  1KB  |  63 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1998 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. */
  7.  
  8. #ifndef _GTLAYOUT_GLOBAL_H
  9. #include "gtlayout_global.h"
  10. #endif
  11.  
  12. #include "Assert.h"
  13.  
  14. VOID
  15. LTP_AddAndRefreshGadgets(struct Window *Window,struct Gadget *Gadgets)
  16. {
  17.     AddGList(Window,Gadgets,(UWORD)-1,(UWORD)-1,NULL);
  18.     RefreshGList(Gadgets,Window,NULL,(UWORD)-1);
  19. }
  20.  
  21. VOID
  22. LTP_StripGadgets(LayoutHandle *Handle,struct Gadget *Gadgets)
  23. {
  24.     if(Handle->Window && Gadgets)
  25.         RemoveGList(Handle->Window,Gadgets,(UWORD)-1);
  26. }
  27.  
  28. VOID
  29. LTP_AddGadgets(LayoutHandle *handle)
  30. {
  31.     if(handle)
  32.     {
  33.         #ifdef DO_BOOPSI_KIND
  34.         {
  35.             if(handle->BOOPSIList)
  36.                 LTP_AddAndRefreshGadgets(handle->Window,(struct Gadget *)handle->BOOPSIList);
  37.         }
  38.         #endif    /* DO_BOOPSI_KIND */
  39.  
  40.         LTP_AddAndRefreshGadgets(handle->Window,handle->List);
  41.  
  42.         GT_RefreshWindow(handle -> Window,NULL);
  43.  
  44.         LTP_DrawGroup(handle,handle -> TopGroup);
  45.     }
  46. }
  47.  
  48. VOID
  49. LTP_AddGadgetsDontRefresh(LayoutHandle *handle)
  50. {
  51.     if(handle)
  52.     {
  53.         #ifdef DO_BOOPSI_KIND
  54.         {
  55.             if(handle->BOOPSIList)
  56.                 AddGList(handle->Window,(struct Gadget *)handle->BOOPSIList,(UWORD)-1,(UWORD)-1,NULL);
  57.         }
  58.         #endif    /* DO_BOOPSI_KIND */
  59.  
  60.         AddGList(handle->Window,(struct Gadget *)handle->List,(UWORD)-1,(UWORD)-1,NULL);
  61.     }
  62. }
  63.